//
//  Header.h
//  VeryEast
//
//  Created by dfws on 16/9/28.
//  Copyright © 2016年 dfwsgroup. All rights reserved.
//

#ifndef Header_h
#define Header_h

#import "NSString+Addition.h"
#import <Masonry/Masonry.h>
#import <Masonry/Masonry.h>
#define ScreenW [UIScreen mainScreen].bounds.size.width
#define ScreenH [UIScreen mainScreen].bounds.size.height

//屏幕适配（效果图为plus）
#define plus_screen_W 414.0//plus屏宽
#define plus_pixel_W 1080.0//plus像素
#define plus_pixel_H 1920.0//plus像素
#define plus_ratio (plus_pixel_W / plus_screen_W)//plus像素比
#define fitScreenW(width) (ScreenW * (width/plus_pixel_W))//适配宽
#define fitScreenH(height) (ScreenH * (height/plus_pixel_H))//适配高
#define fitScreenFont(size) ((size/plus_ratio) * (ScreenW/plus_screen_W))//适配字号


#define ABOVE_7 [[UIDevice currentDevice].systemVersion floatValue] >= 7.0f


#define NAV_COLOR [UIColor colorWithHexString:@"#3772b6"]           //导航背景蓝色#3672b5
#define Module_COLOR [UIColor colorWithHexString:@"#f9f9f9"]        //分割模块的底色
#define BG_COLOR [UIColor colorWithHexString:@"#f3f3f3"]            //页面底色
#define Line_COLOR [UIColor colorWithHexString:@"#e5e5e5" alpha:0.5]//分割线颜色
#define TEXT_COLOR [UIColor colorWithHexString:@"#333333"]          //最重文字颜色
#define Normal_TEXT_COLOR [UIColor colorWithHexString:@"#777777"]   //普通级文字颜色
#define Assist_TEXT_COLOR [UIColor colorWithHexString:@"#999999"]   //辅助文字颜色
#define Orange_TEXT_COLOR [UIColor colorWithHexString:@"#ff7214"]   //橘色文字颜色

#define Title_TEXT_COLOR [UIColor colorWithHexString:@"#4a4a4a"]

//RGB的颜色转换
#define kUIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define kUIColorFromRGBA(rgbValue,a) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:a]

#define kCommonColor kUIColorFromRGB(0x41a1ff)
#define kCommonLineColor kUIColorFromRGB(0xeeeeee)
#define kCommonTextColor_One  kUIColorFromRGBA(0x000000, 0.85)
#define kCommonlogLine  kUIColorFromRGBA(0x000000, 0.25)
#define kCommonGreenColor kUIColorFromRGB(0x7fca5b)

#define RGBAColor(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
#define RGBColor(r, g, b) RGBAColor(r,g,b,1.0)
#define kGlobalBg kUIColorFromRGB(0xf6f6f6)
#define kUIScreenSize [UIScreen mainScreen].bounds.size
#define kUIScreenWidth kUIScreenSize.width
#define kUIScreenHeight kUIScreenSize.height

#endif /* Header_h */
